# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=guile-git
pkgver=0.9.0
pkgrel=0
pkgdesc="Guile bindings of libgit2"
url="https://gitlab.com/guile-git/guile-git"
arch="all"
license="GPL-3.0-or-later"
depends="guile guile-bytestructures libgit2-dev"
makedepends="autoconf automake guile-dev zlib-dev texinfo"
checkdepends="openssh-server openssh-client"
subpackages="$pkgname-doc"
options="!strip" # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907061
source="https://gitlab.com/guile-git/guile-git/-/archive/v$pkgver/guile-git-v$pkgver.tar.bz2"
builddir="$srcdir/$pkgname-v$pkgver"

prepare() {
	default_prepare
	autoreconf -vfi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	# TODO: Ensure that check-abi is run before check.
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
42fbdbbf637b5b14cf4d8aa56e1b96dcc6e454f7d077fa2304ed44dc2485fe4c90557e2fb33220e3e8145a1fcb6ccd68cd4f40ff325386099c3232d9e373fc0b  guile-git-v0.9.0.tar.bz2
"
